exports.__esModule = true;
class RuntimeException {
  constructor(message) {
    this._message = message;
  }

  get name() {
    return 'RuntimeException';
  }

  get message() {
    return this._message;
  }

  toString() {
    return this.name + ': ' + this.message;
  }
}

exports.RuntimeException = RuntimeException;
class IllegalStateException extends RuntimeException {
  constructor(message) {
    super(message);
  }

  get name() {
    return 'IllegalStateException';
  }
}

exports.IllegalStateException = IllegalStateException;
class InvalidArgumentException extends RuntimeException {
  constructor(message) {
    super(message);
  }

  get name() {
    return 'InvalidArgumentException';
  }
}

exports.InvalidArgumentException = InvalidArgumentException;
class NotImplementedException extends RuntimeException {
  constructor(message) {
    super(message);
  }

  get name() {
    return 'NotImplementedException';
  }
}

exports.NotImplementedException = NotImplementedException;
class ExceptionService {
  static handleError(error) {
    think.logger.error(error);
    return {
      success: false,
      error: error.name || 'Error',
      msg: error.message || error,
      errno: 1000
    };
  }
}
exports.ExceptionService = ExceptionService;